package sps.admin.module.business.workinghours.domain.form;

import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.swagger.v3.oas.annotations.media.Schema;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import sps.base.common.json.deserializer.DictValueVoDeserializer;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 工时功能 新建表单
 *
 * @Author yjg
 * @Date 2024-09-09 11:02:13
 * @Copyright v1.0
 */

@Data
public class WorkingHoursAddForm {

    @Schema(description = "部门名称")
    private String deptName;

    @Schema(description = "部门ID")
    private Long departmentId;

    @Schema(description = "姓名")
    private String name;

    @Schema(description = "工号")
    private String jobNumber;

    @Schema(description = "班别类型")
    @NotBlank(message = "班别类型不能为空 ")
    @JsonDeserialize(using = DictValueVoDeserializer.class)
    private String banbieType;

    @Schema(description = "加班类型")
    @NotBlank(message = "加班类型不能为空 ")
    @JsonDeserialize(using = DictValueVoDeserializer.class)
    private String overtimeType;

    @Schema(description = "就餐数")
    private Integer mealsNumber;

    @Schema(description = "加班数")
    private String overtimeNumber;

    @Schema(description = "加班数2")
    private String overtimeNumber2;

    @Schema(description = "加班原因")
    @Length(max = 200, message = "工号最多300字符")
    private String overtimeResult;

    @Schema(description = "加班日期")
    private LocalDate overtimeData;

    @Schema(description = "中午加班开始时间")
    private String noonStartOvertime;

    @Schema(description = "中午加班结束时间")
    private String noonEndOvertime;

    @Schema(description = "晚上加班开始时间")
    private String nightStartOvertime;

    @Schema(description = "晚上加班结束时间")
    private String nightEndOvertime;

    @Schema(description = "夜里加班开始时间")
    private String nightshiftStartOvertime;

    @Schema(description = "夜里加班结束时间")
    private String nightshiftEndOvertime;

    @Schema(description = "是否审批通过： 0：录入  1：审批通过 2：审批不通过 3：撤销")
    private Integer allowFlag = 0;

    @Schema(description = "审批时间")
    private LocalDateTime allowTime;

    @Schema(description = "审批人")
    private String allowMember;

    @Schema(description = "删除标识")
    private Boolean deletedFlag;

    @Schema(hidden = true)
    private Long createUserId;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "人员ID")
    private List<String> memberIdList;

    @Schema(description = "工时类型（0工时，1加班）")
    private Boolean overtimeFlag;

    @Schema(description = "部门ID")
    private List<Long> departmentIds;


}